project(MQTTClient C)

# 设置可执行文件输出路径
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)

# 定义可执行文件目标
add_executable(mqttClient mqttClient.c)

# 指定MQTT客户端头文件路径、库路径以及链接库
# MQTT头文件路径
target_include_directories(mqttClient PRIVATE /home/IMX6ULL/lib/paho.mqtt.c-1.3.8/install/include)

# MQTT搜索路径
target_link_directories(mqttClient PRIVATE /home/IMX6ULL/lib/paho.mqtt.c-1.3.8/install/lib)

# 库路径
target_link_libraries(mqttClient PRIVATE paho-mqtt3c)
